package lrscp.lib.utils;

import java.io.IOException;

import org.jsoup.Jsoup;
import org.jsoup.nodes.Document;

public class NetUtils {
    public static long getGoogleSearchResult(String keyword) throws IOException {
        Document doc = Jsoup.connect("https://www.google.com.hk/search?q=" + keyword).userAgent("")
                .get();
        return Long
                .valueOf(doc.getElementById("resultStats").text().replace(",", "").split(" ")[1]);
    }
}
